# Mountaniol Vsevolod
# 01/05/2003



# Tools
# CC=$(shell which gcc)
CC=gcc
# CC=insure
CFLAGS= -Wall -pedantic  -g3 -include /usr/include/errno.h \
-I../inc/ \
-DUSE_FLAGS \
-DUSE_HOOKS \
-DDEBUG \

# -DBE_VERBOSE \


# Includes
INCLUDE= -ID:/cygwin/usr/include

# Objects
ALL_OBJS=$(subst .c,.o,$(shell ls *.c ))

# Target name 
TARGET=up


# Default action
all: $(ALL_OBJS) 
	@echo Building...
#	$(CC) $(CFLAGS) $(ALL_OBJS) -lz -o $(TARGET)
	$(CC) $(CFLAGS) $(ALL_OBJS) -o $(TARGET)
	@echo Done.

clean:
	@echo Cleaning...
	rm -f $(ALL_OBJS) $(TARGET)
	@echo Done.

ca: clean all

tar: clean

# Building rules
%.o:%.c
	@echo building $@...
	@$(CC) -g $(INCLUDE) $(CFLAGS) -c -o $@ $<
	@echo $@ done.
            
